package com.juzi.wopu.service.impl;

import java.util.List;
import java.util.Map;
import com.juzi.wopu.domain.Role;
import com.juzi.wopu.service.IRoleService;

public class RoleServiceImpl extends BaseServiceImpl<Role> implements IRoleService{

	@Override
	public void getRolerMap(Map<Long, Role> map1, Map<String, Role> map2){
		List<Role> list=BaseDao.getAll(Role.class);
		if(list!=null && list.size()>0){
			if(map1!=null && map2==null){
				for(Role c:list){
					map1.put(c.getIId(), c);
				}
			}
			else if(map1==null && map2!=null){
				for(Role c:list){
					map2.put(c.getsName(), c);
				}
			}
			else if(map1!=null && map2!=null){
				for(Role c:list){
					map1.put(c.getIId(), c);
					map2.put(c.getsName(), c);
				}
			}
		}
		
	}

}






